#!/bin/sh
set +e

cat /proc/mounts | grep -q mtd2 || (echo "Filesystem not mounted use device_format_jffs2 command to setup your partition"; exit 1)

passwd
install -D /etc/passwd /etc/shadow /etc/group -t /mnt/jffs2/etc
cd /etc
md5sum passwd shadow group 2>/dev/null > /mnt/jffs2/etc/password.md5
sync

